home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-04 | 2.5 KB | 58 lines | [TEXT/SPM ] |
- Steps to add new functionality to the IC application:
-
- 1. Add a user item for the button in the main dialog, res id 200. You
- may need to change the size of the dialog, but try not to shuffle
- existing items (users should be used to the location of existing
- items).
- 2. Edit the WHAT resource, id 200, to add your button to the list.
- 3. Add an icon family with resource id 200 + your dialog item
- (i.e. if your item is 12, make an icon family with id 212).
- Also add the string to display under your icon to STR# res id
- 130.
- 4. Build a dialog to handle your items. The trick here is to try to
- reuse existing code for some items. IC already includes a
- nice set of routines for working with text strings; there are
- other built-in things too. Get to know the built in stuff and
- reuse it as much as possible.
- 5. Don't forget to add your WHAT resource...
- 6. Don't forget to add your item to the MENU resource.
- 7. Optional - Add your item to the "IC Window Globals.h" file.
- Note this is not required, the C version of the IC app
- can handle changes to the number of WHAT resources.
-
- At this point you are at a crossroads. If you were able to implement
- your entire dialog by using the WHATs that already exist, then you
- are done. Just re-compile the app and you should see your icon on the
- main dialog and you should be able to use it without any problems.
-
- However, if you needed to create a new WHAT (i.e. when I was adding
- a SOCKS window, I wanted to add a 'CBOX' WHAT to do a checkbox for
- enabling/disabling the use of SOCKS), then you must continue with the
- next steps.
-
- 8. The resource file is done; save it and get out of it.
- 9. For each new WHAT you need to create, do the following:
-
- a. Create the header and source file; include the source
- file into the project.
-
- b. Write the code to handle the WHAT; remember that the
- what can react to an open, flush, close, click, key, and
- idle event; use those that you feel that you need to. You'll
- probably need at least an open & flush proc.
-
- c. Open "IC Window Globals.h" and add your whatXXXX to
- the enumeration; add it before whatLAST.
-
- d. Open "IC Windows.c" and add your callbacks to the
- InitWhats() function, your header file.
-
- 10. Build your app (fix any bugs ;-)
-
- At this point you have a modified version of the Internet Config application
- which can be used to edit your prefs.
-
- Of course, you should distribute your new application and code so other
- IC programmers will include your modifications when they make a customized
- IC application ;-)
-